#version 450

layout(location=0) in vec3 v_Normal;
layout(location=1) in vec3 v_ViewVec;
layout(location=2) in float v_LodBias;

layout(binding=1) uniform samplerCube u_texture;

layout(location=0) out vec4 fragColor;

void main() {
    vec3 N = normalize(v_Normal);
    vec3 V = normalize(v_ViewVec);
    vec3 VR = reflect(V, N);
    fragColor = texture(u_texture, VR, v_LodBias);
}